package com.example;

import com.example.service.HelloWorld;
import com.example.service.HelloWorldService;
import com.example.service.Role;
import com.example.service.User;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

@Slf4j
public class Client {

    public static void main(String[] args) {
        HelloWorldService helloWorldService = new HelloWorldService();
        HelloWorld helloWorld = helloWorldService.getHelloWorldPort();
//        System.out.println(helloWorld.say("WebService"));
        User user = new User();
        user.setId(1);
        user.setUserName("root");
        user.setPassword("root");
        List<Role> roleList = helloWorld.getRoleByUser(user);
        for (Role role:roleList) {
            log.debug("角色ID为"+(role.getId())+" 角色名称为"+(role.getRoleName()));
        }
    }

}
